/*
@Time: 2025/9/22 20:11
@Author: Leslie
@Function: 验证码控制层
*/

package controller

import (
	"admin_api/api/service"
	"admin_api/common/result"
	"github.com/gin-gonic/gin"
)

// @Summary 验证码接口
// @Produce json
// @Description 验证码接口
// @BasePath /api
// @Success 200 {object} result.Result
// @Router /captcha [get]
// @Param 无 query string false "该接口无需请求参数"
func Captcha(c *gin.Context) {
	IdKey, base64Image := service.CaptMake()
	result.Success(c, map[string]interface{}{"id": IdKey, "base64Image": base64Image})
}
